import request from '@/config/axios'

class Comment {
	getComment(data : any) : Ajax.PromiseAxiosResponse<any> {
		return request.get({
			url: '/comment/getComment', params:data
		})
	}
	getCommentById(data : any) : Ajax.PromiseAxiosResponse<any> {
		return request.get({
			url: '/comment/getCommentById', params:data
		})
	}
	getReply(data : any) : Ajax.PromiseAxiosResponse<any> {
		return request.get({
			url: '/comment/getReply', params:data
		})
	}
	addComment(data : any) : Ajax.PromiseAxiosResponse<any> {
		return request.post({
			url: '/comment/addComment',data
		})
	}
	love(data : any) : Ajax.PromiseAxiosResponse<any> {
		return request.get({
			url: '/comment/love',params:data
		})
	}
}

export const CommentApi = new Comment()